package it.das.proxy;

import java.lang.reflect.Method;

import org.springframework.aop.MethodBeforeAdvice;

/**
 * This is the Advice that is used when we want our common/transaction code to get execute at the method starting.
 * @author ad
 *
 */
public class TaskAProxyBefore implements MethodBeforeAdvice {

	@Override
	public void before(Method method, Object[] args, Object target) throws Throwable {
		System.out.println("PROXY of TaskA - START");
		System.out.println("ARGS: " + (args != null ? args.toString() : " no_arg_found "));
		System.out.println("Before EXECUTION of (" + method.getName() + ") for ("  + target.getClass().getName() + ")");
		System.out.println("PROXY of TaskA - END");
	}
}
